var $video = $('video');
$video.eq(0).show();

function event(obj, e) {
    obj.addEventListener(e, function () {
        if (e == 'ended') {
            $(this).hide();
            var $next = $(this).next();
            if ($next.length > 0) {
                $next.css('display','inline-block');
                $next[0].play();
                event($next[0], "play");
                event($video[0],"loadstart");
                event($next[0], 'ended');
            }else{
                $video.eq(0).css('display','inline-block');
                $video[0].play();
                event($video[0], "play");
            }
        }
    }, false);
}
$video[0].play();
event($video[0],"loadstart");
event($video[0], 'ended');//播放结束


